using System.Collections.Generic;
using Presentation.Web.Client.Models;

namespace Presentation.Web.Client.Areas.SalesManagement.Models
{
    public class SalesViewModel
    {
        public LinksCollectionViewModel SalesActionLinks
        {
            get { return _salesActionLinks ?? (_salesActionLinks = GetSalesActionLinks()); }
        }
        private LinksCollectionViewModel _salesActionLinks;

        #region Private Methods

        private LinksCollectionViewModel GetSalesActionLinks()
        {
            var salesActionLinksBlock = new LinksCollectionViewModel("Sales");

            var salesActionLinks = new List<Link>
                                       {
                                           new Link
                                               {
                                                   Name = "Orders",
                                                   Action = "List",
                                                   Control = "Orders",
                                                   Area = "SalesManagement"
                                               },
                                           new Link
                                               {
                                                   Name = "Invoices",
                                                   Action = "List",
                                                   Control = "Invoices",
                                                   Area = "SalesManagement"
                                               },
                                               new Link
                                               {
                                                   Name = "Events",
                                                   Action = "List",
                                                   Control = "Events",
                                                   Area = "Events"
                                               },

                                               new Link
                                               {
                                                   Name = "Customers",
                                                   Action = "List",
                                                   Control = "Partners",
                                                   Area = "PartnersManagement"
                                               },
                                               new Link
                                               {
                                                   Name = "Reports",
                                                   Action = "Index",
                                                   Control = "Reports",
                                                   Area = "SalesManagement"
                                               },
                                       };
            salesActionLinks.ForEach(link => salesActionLinksBlock.Links.Add(link));
            return salesActionLinksBlock;
        }

        #endregion
    }
}